package com.qqtop10.manager.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.qqtop10.manager.dao.SearchRecommendMapper;
import com.qqtop10.manager.model.SearchRecommendKeyword;
import com.qqtop10.manager.service.SearchRecommendKeywordService;
import com.qqtop10.manager.utils.RandomUtils;

@Service("searchRecommend")
public class SearchRecommendKeywordServiceImpl implements SearchRecommendKeywordService {

	@Autowired
	private SearchRecommendMapper searchKeyword;

	@Override
	public List<SearchRecommendKeyword> all() {
		return searchKeyword.all();
	}

	@Override
	public void saveRecommend(SearchRecommendKeyword input) {
		input.setUuid(RandomUtils.makeUUID());
		searchKeyword.saveRecommend(input);
	}

	@Override
	public int getShowCount() {
		return searchKeyword.getShowCount();
	}

	@Override
	public int showOrHiddenRecommend(Map<String, Object> map) {
		return searchKeyword.showOrHiddenRecommend(map);
	}

	@Override
	public int deleteRecommend(int ids) {
		return searchKeyword.deleteRecommend(ids);
	}

	@Override
	public List<SearchRecommendKeyword> showRecommend() {
		return searchKeyword.showRecommend();
	}

	@Override
	public int editRecommend(SearchRecommendKeyword keyword) {
		return searchKeyword.editRecommend(keyword);
	}

}
